InstallShield 2016 » InstallScript Language Reference
Project • This information applies to the following project types:
• | InstallScript |
• | InstallScript MSI |
/*--------------------------------------------------------------*\
*
* InstallShield Example Script
*
* Demonstrates the SdAskDestPath2 function.
*
* SdProductName is called to set the product name so that it
* can be displayed in place of the %P placeholder in the
* SdAskDestPath2 dialog. Then, SdAskDestPath2 is called to
* prompt the user for a path. Finally, the selected path
* is assigned to the system variable TARGETDIR, which is
* displayed in a message box.
*
\*--------------------------------------------------------------*/
#define TITLE_TEXT "SdAskDestPath2 Example"
STRING svDir;
#include "ifx.h"
function OnBegin()
begin
// Set product name.
SdProductName ("Example Product 5.2");
// Disable the Back button in setup dialogs.
Disable (BACKBUTTON);
// Set default folder name for call to SdAskDestPath2.
svDir = "C:\\ISEXampl\\Target";
// Display the SdAskDestPath2 dialog. Pass a null string
// in the second parameter to display the default message.
if (SdAskDestPath2 (TITLE_TEXT, "", svDir ) = NEXT) then
TARGETDIR = svDir;
endif;
// Display the new target directory.
SprintfBox (INFORMATION, "SdAskDestPath2", "Successful.\n\nThe Target " +
"directory is: " + TARGETDIR);
end;
InstallShield 2016 Help LibraryMay 2017 |
Copyright Information | Flexera Software |